package menu

const getMenuByUserId = `
select m.id,m.name,m.parent,m.level_id,m.icon,m.path,m.is_open
from sso_system_menu m
inner join sso_role_menu u on m.id=u.menu_id
inner join sso_user_role r on r.role_id=u.role_id and r.user_id=@user_id
inner join sso_system_info s on s.id=r.sys_id and s.ident=@ident and m.sys_id=s.id
where s.enable=0
order by m.parent asc,m.level_id desc,m.sortrank asc
`
